package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.KhuyenMaiDao;
import com.tt.fashionWebSite.domain.CapBac;
import com.tt.fashionWebSite.domain.KhuyenMai;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("khuyenMai")
public class KhuyenMaiJpaDao extends GenericJpaDao<KhuyenMai,String> implements KhuyenMaiDao {
    public KhuyenMaiJpaDao(){
        super(KhuyenMai.class);
    }

    @Override
    public List<KhuyenMai> getAllDeal(){
        return getEntityManager().createNamedQuery(KhuyenMai.GET_ALL_DEAL, KhuyenMai.class).getResultList();
    }
}
